import request from './request.js'

// 接口测试
export function testNetwork() {
  return request({ url: `/slides`, method: 'GET' })
}

// 获取验证码
export function postMsg(data) {
  return request({
    url: `index.php/api/sms/send`, method: 'POST', data
  })
}

// 登录 
export function postLogin(data) {
  return request({ url: `api/property/house_user/mobilelogin`, method: 'POST', data })
}

// 程序初始化支付信息等
export function getInit(data) {
  return request({
    url: `api/property/index/wx_config`, method: 'GET', data
  })
}

// 获取幻灯片banner列表
export function getBannerList(data) {
  return request({ url: `api/property/index/slide`, method: 'GET', data })
}

// 获取 通知公告、招商
export function getNewsList(data) {
  return request({ url: `api/property/index/notice`, method: 'GET', data })
}

// 获取物业电话 
export function getCustPhone(data) {
  return request({ url: `api/property/index/phone`, method: 'GET', data })
}

// 获取水费户号列表 
export function getWAccountList(data) {
  return request({ url: `api/property/house_user/water`, method: 'GET', data })
}

// 获取水费余额 
export function getWBalance(data) {
  return request({ url: `api/property/house_user/get_water`, method: 'GET', data })
}

// 获取电费户号列表 
export function getEAccountList(data) {
  return request({ url: `api/property/house_user/electric`, method: 'GET', data })
}

// 获取电费余额 
export function getEBalance(data) {
  return request({ url: `api/property/house_user/get_electric`, method: 'GET', data })
}

// 绑定常用电表号 
export function postBindElectric(data) {
  return request({ url: `api/property/house_user/bind_electric`, method: 'POST', data })
}

// 取消绑定电表号 
export function postUnbindElectric(data) {
  return request({ url: `api/property/house_user/cancel_bind_electric`, method: 'POST', data })
}

// 绑定常用水表号 
export function postBindWater(data) {
  return request({ url: `api/property/house_user/bind_water`, method: 'POST', data })
}

// 取消绑定水表号 
export function postUnbindWater(data) {
  return request({ url: `api/property/house_user/cancel_bind_water`, method: 'POST', data })
}

// 获取物业房租费账单列表
export function getBillList(data) {
  return request({ url: `api/property/house_user/bill`, method: 'GET', data })
}

// 获取物业房租费账单详情
export function getBillDetail(data) {
  return request({ url: `api/property/house_user/bill_details`, method: 'POST', data })
}

// 根据微信登录获得的code换取openid
export function getOpenid(data) {
  return request({ url: `api/property/index/wx_login`, method: 'GET', data })
}

// 根据openid获取建行(微信)支付信息
export function postPayInfo(data) {
  return request({ url: `api/property/jpay/wx_order`, method: 'POST', data })
}

// 获取我的房间列表
export function getRoomList(data) {
  return request({ url: `api/property/house_user/house`, method: 'GET', data })
}

// 获取房间详情
export function getRoomDetail(data) {
  return request({ url: `api/property/house_user/house_details`, method: 'GET', data })
}

// 获取我的缴费列表
export function getRecordList(data) {
  return request({ url: `api/property/house_user/finance`, method: 'GET', data })
}

// 获取报修记录列表 reqRepairList
export function getRepairList(data) {
  return request({ url: `api/property/house_user/repair`, method: 'GET', data })
}

// 添加报修 
export function postAddRepair(data) {
  return request({ url: `api/property/house_user/add_repair`, method: 'POST', data })
}

// 获取新闻详情 
export function reqNewsDetail(data) {
  return request({ url: `api/property/index/notice_details`, method: 'GET', data })
}

// 用户协议和隐私政策详情 
export function reqPrivacy(data) {
  return request({ url: `api/property/agreement/getAgreement_details`, method: 'GET', data })
}